package com.alan.app.chat;

import tomkitty.turdlet.*;
import java.sql.*;

public class TestTurdlet extends TurdletBase implements Turdlet {

	public TestTurdlet() {
	}
	
    public void doit() {
    	try {
			Connection con = 
				DriverManager.getConnection("jdbc:mysql://localhost/jTest", "alan", "asdf2k2");
			
			Statement st = con.createStatement();			ResultSet rs = st.executeQuery("select * from test");
			while(rs.next())			{				print("Name " + rs.getString(1));				print("Id " + rs.getString(2));			}
    	} catch (Exception e) {
    		e.printStackTrace();

				print("<h1>Hello Kitty!</h1>");
    	}
    }
}
